/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.com.betacom.scjp.j2se5chapterReviews;

/**
 * 
 */
public class CodeWalkTwo {
	int x = 3;
	static int y = 3;
	public static void main(String[] args) {
		int x = 10;
		int y = 10;
		CodeWalkTwo boardWalk = new CodeWalkTwo();
		boardWalk.printIt();
		boardWalk.printIt(y);
	}
	
	{ x = x+1; } // 
	
	// Mine (initializer tests) [[
	{ System.out.println("1st"); }
	
	{ System.out.println("2nd");}
	
	static Object o;
	
	static { System.out.println(o.toString());} // throws exception - runs first
	
	static { o = new Object(); }
	
	// ]]
	
	static { y += y; }

	private void printIt() {
		System.out.println(++x);
	}

	private void printIt(int y) {
		System.out.println(" " + ++y);
	}
}
